import { get } from "../utils/request";

//加载分类
export const loadCategoriesAPI = () => get("/api/v1/product_categories");

//加载商品
export const loadProductsAPI = (page = 1, category = "") =>
  get("/api/v1/products", { page, category });
//根据商品id加载数据
export const loadProductByIdAPI = (id) => get("/api/v1/products/" + id);
